package day14.com.zhiyou100;

import java.util.LinkedList;

public class Demo05 {
    public static void main(String[] args) {
        LinkedList<String> linkedList = new LinkedList<>();
        linkedList.addLast("张三");
        linkedList.addLast("李四");
        linkedList.addLast("王五");
        linkedList.addLast("赵六");
        linkedList.addLast("田七");
        linkedList.addLast("周八");
        linkedList.addLast("孙九");
        linkedList.addLast("郑十");
        System.out.println(linkedList);
        // pop()  弹 栈的操作
        String pop = linkedList.pop();
        System.out.println(pop);// 张三--->
        // push()
        linkedList.push("豆豆");
        System.out.println(linkedList);//

    }
}
